home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d963.lha / SIOD / scm / with-input.scm < prev   
Text File  |  1993-08-19  |  427b  |  12 lines

  1. (define (with-output s p)
  2.         (letrec ((o (fluid output-port))
  3.                  (f (open-port s "w" -1))
  4.                  (e (lambda () (close-output-port f)
  5.                                (set! (fluid output-port) o))))
  6.              (set! (fluid output-port) f)
  7.              (call-on-reset e)
  8.              (p)
  9.              (close-output-port f)
  10.              (set! (fluid output-port) o)
  11.              (uncall-on-reset e)))
  12.